Apply a patch by Padraig O'Briain to avoid a deadlock.
authorMatthias Clasen <mclasen@redhat.com>
Fri, 29 Sep 2006 14:18:22 +0000 (14:18 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 29 Sep 2006 14:18:22 +0000 (14:18 +0000)
2006-09-29  Matthias Clasen  <mclasen@redhat.com>
        * gtk/gtkfilesystemunix.c: Apply a patch by Padraig O'Briain
        to avoid a deadlock.

ChangeLog
gtk/gtkfilesystemunix.c

index 94950af5d6d78d806177c316f3d055260ea919ff..6410756e94da838a1d7a276643d43f1044eefeac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-09-29  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkfilesystemunix.c: Apply a patch by Padraig O'Briain
+       to avoid a deadlock.
+
 2006-09-27  Kristian Rietveld  <kris@imendio.com>
 
        * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_free_level),
index 64ed3f7db63b7e0eaf4a810ff81894062ab7d0d6..23b24c01a14f3728a10334dab4c7dbbf089ee97f 100644 (file)
@@ -255,6 +255,7 @@ static GtkFileInfo *create_file_info              (GtkFileFolderUnix *folder_uni
                                                   const char *mime_type);
 
 static gboolean execute_callbacks_idle (gpointer data);
+static void execute_callbacks (gpointer data);
 
 static gboolean fill_in_names     (GtkFileFolderUnix  *folder_unix,
                                   GError            **error);
@@ -443,7 +444,7 @@ gtk_file_system_unix_dispose (GObject *object)
       system_unix->execute_callbacks_idle_id = 0;
 
       /* call pending callbacks */
-      execute_callbacks_idle (system_unix);
+      execute_callbacks (system_unix);
     }
 
   G_OBJECT_CLASS (gtk_file_system_unix_parent_class)->dispose (object);
@@ -699,15 +700,13 @@ struct callback_info
 
 
 
-static gboolean
-execute_callbacks_idle (gpointer data)
+static void
+execute_callbacks (gpointer data)
 {
   GSList *l;
   gboolean unref_file_system = TRUE;
   GtkFileSystemUnix *system_unix = GTK_FILE_SYSTEM_UNIX (data);
 
-  GDK_THREADS_ENTER ();
-
   if (!system_unix->execute_callbacks_idle_id)
     unref_file_system = FALSE;
   else
@@ -746,6 +745,14 @@ execute_callbacks_idle (gpointer data)
     g_object_unref (system_unix);
 
   system_unix->execute_callbacks_idle_id = 0;
+}
+
+static gboolean
+execute_callbacks_idle (gpointer data)
+{
+  GDK_THREADS_ENTER ();
+
+  execute_callbacks(data);
 
   GDK_THREADS_LEAVE ();